package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.vo.IndexSchoolRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SchoolRoleMapper;
import com.ruoyi.system.domain.SchoolRole;
import com.ruoyi.system.service.ISchoolRoleService;

/**
 * 学校角色增删改查Service业务层处理
 * 
 * @author hyb
 * @date 2023-02-02
 */
@Service
public class SchoolRoleServiceImpl implements ISchoolRoleService 
{
    @Autowired
    private SchoolRoleMapper schoolRoleMapper;

    /**
     * 查询学校角色增删改查
     * 
     * @param id 学校角色增删改查主键
     * @return 学校角色增删改查
     */
    @Override
    public SchoolRole selectSchoolRoleById(Long id)
    {
        return schoolRoleMapper.selectSchoolRoleById(id);
    }

    /**
     * 查询学校角色增删改查列表
     * 
     * @param schoolRole 学校角色增删改查
     * @return 学校角色增删改查
     */
    @Override
    public List<SchoolRole> selectSchoolRoleList(SchoolRole schoolRole)
    {
        return schoolRoleMapper.selectSchoolRoleList(schoolRole);
    }

    /**
     * 新增学校角色增删改查
     * 
     * @param schoolRole 学校角色增删改查
     * @return 结果
     */
    @Override
    public int insertSchoolRole(SchoolRole schoolRole)
    {
        return schoolRoleMapper.insertSchoolRole(schoolRole);
    }

    /**
     * 修改学校角色增删改查
     * 
     * @param schoolRole 学校角色增删改查
     * @return 结果
     */
    @Override
    public int updateSchoolRole(SchoolRole schoolRole)
    {
        return schoolRoleMapper.updateSchoolRole(schoolRole);
    }

    /**
     * 批量删除学校角色增删改查
     * 
     * @param ids 需要删除的学校角色增删改查主键
     * @return 结果
     */
    @Override
    public int deleteSchoolRoleByIds(Long[] ids)
    {
        return schoolRoleMapper.deleteSchoolRoleByIds(ids);
    }

    /**
     * 删除学校角色增删改查信息
     * 
     * @param id 学校角色增删改查主键
     * @return 结果
     */
    @Override
    public int deleteSchoolRoleById(Long id)
    {
        return schoolRoleMapper.deleteSchoolRoleById(id);
    }

    @Override
    public List<SchoolRole> selectSchoolRoleListBySystemDeptId(Long deptId) {
        return schoolRoleMapper.selectSchoolRoleListBySystemDeptId(deptId);
    }

    @Override
    public IndexSchoolRole selectSchoolRoleAndSysUserById(Long id) {
        return schoolRoleMapper.selectSchoolRoleAndSysUserById(id);
    }

    @Override
    public void updateSchoolRoleByUserId(SchoolRole schoolRole) {
        schoolRoleMapper.updateSchoolRoleByUserId(schoolRole);
    }
}
